Skip to content

Fix transient server errors reported as dead links - #300

Merged
TMHSDigital merged 2 commits into
TMHSDigital:mainfrom
Nelmad:bugfix/transient-link-errors
Nov 10, 2026
Merged

TMHSDigital merged 2 commits into
TMHSDigital:mainfrom
Nelmad:bugfix/transient-link-errors

Conversation

@Nelmad

@Nelmad Nelmad commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Fix transient server errors reported as dead links

Fixes #275.

HTTP 502/503/504 responses now use kind: "unavailable" and appear under Could not check, without increasing the problems output used for the report issue's “sources need a look” count. This covers both catalog source URLs and licence pages quoted in Evidence or linked in Notes. The existing single retry is retained, including recovery to HTTP 200. The handling of other statuses, including 404/410 and 401/403/429, is preserved.

Related: #299 addresses the same classification issue. This alternative also includes unavailable in the retry condition and reports temporarily unavailable Evidence/Notes URLs, with CLI regression coverage for both behaviors and the problem count.

Regression tests in site/lib/lib.test.mjs cover classification and run the real CLI against an isolated catalog with mocked DNS and HTTP. An outage-only fixture now produces problems=0; a mixed fixture counts only the four genuinely dead source/licence links. Existing GitHub API failures remain visible under Could not check.

Validation: npm run check passed locally after rebasing onto ea44b24, on Node.js v22.22.3 (lint, 274 catalog assertions, 1,741 library assertions, validate, check-added and build). Before the production fix, the new regression checks reproduced the inflated problem counts.

Prepared with AI assistance. This change modifies checker logic and tests only; no catalog or licence facts are changed.

Type

  • Docs or site

Checklist

  • npm test && npm run validate passes locally (the full npm run check also passed)
  • I dedicate this contribution to the public domain under CC0 1.0 (see CONTRIBUTING)

Catalog-entry and starter-stack checklist items do not apply.

Nelmad and others added 2 commits November 10, 2026 13:14
On Windows an absolute path like C:\... is read as a URL with scheme
"c:", so the TMHSDigital#275 CLI test failed with ERR_UNSUPPORTED_ESM_URL_SCHEME.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LpkeXPtfg3jGzhfoGMshTE
@TMHSDigital
TMHSDigital merged commit 68e6128 into TMHSDigital:main Nov 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Link check reports transient 5xx answers (GitHub outage) as dead links

2 participants